package GlavFinans::Module::Content::Controller::Page;

use utf8;
use Data::Dumper;
use Mojo::Base 'Mojolicious::Controller';

sub view {
	my $self = shift;
	
	my $name = $self->stash('name');
	my $page = $self->app->db->resultset('Page')->search({ name => $name })->single;

	unless ( $page ) { 
		$self->render_not_found();
		$self->rendered(1);
	} else {
		$self->render('content/page/view', page => $page );
	}
}

1;
